<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="format-detection" content="telephone=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<link href="css/bksystem.css" rel="stylesheet" type="text/css" />
		<link href="font/iconfont.css" rel="stylesheet" type="text/css" />
		<link href="css/module.css" rel="stylesheet" type="text/css" />
		<link href="css/pages.css" rel="stylesheet" type="text/css" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<title>系统日志</title>
		<script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
		<script src="js/jquery.nicescroll.js" type="text/javascript"></script>
		<script src="js/HUpages.js" type="text/javascript"></script>
		<!--[if lt IE 9]>
          <script src="js/html5shiv.js" type="text/javascript"></script>

        <![endif]-->
		<script src="js/css3-mediaqueries.js"  type="text/javascript"></script>
		<script src="${pageContext.request.contextPath}/static/echarts/echarts.min.js"></script>
		<script src="js/jquery.js"></script>
		<style>

		</style>
	</head>
	<body>
	<div style="display: flex">


			<div style="width: 100%; height: 400px;">
				<div id="sz" style="width: 100%; height: 100%;"></div>
			</div>
		</div>
	</div>
	<script>
		$.ajax({
			url: "SumServlet",
			dataType: "json",
			type: "post",
			success: function (dataJSON) {
				// 获取容器元素
				var container = document.getElementById('sz');

				// 基于准备好的容器，初始化 ECharts 实例
				var chart = echarts.init(container);

				// 配置数据
				var options = {
					title: {
						text: '近一个星期的销售额'
					},
					xAxis: {
						type: 'category',
						data: dataJSON.dataArr
					},
					yAxis: {
						type: 'value'
					},
					type: 'line',

					series: [{
						type: 'line',
						data: dataJSON.sumArr
					}]
				}
				// 使用配置项显示图表
				chart.setOption(options);
			}
		});
	</script>
	</body>
</html>
